import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import './style.css'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import {setupGlobDirectives} from "./directives";
import log from  "./utils/log"
import '@fortawesome/fontawesome-free/css/all.css'
// import VueKonva from 'vue-konva'

const app = createApp(App)

// 注册全局指令
setupGlobDirectives(app);
// app.use(VueKonva)

app.use(ElementPlus, {
    locale: zhCn,
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 在vue原型上创建变量
app.config.globalProperties.$log = log

app.use(router).mount('#app')
